$OpenBSD: patch-platform_build_bsd_ant_build_xml,v 1.2 2014/10/03 15:30:42 sthen Exp $
--- platform_build/bsd_ant/build.xml.orig	Mon Dec  2 19:50:04 2013
+++ platform_build/bsd_ant/build.xml	Fri Oct  3 16:29:31 2014
@@ -4,8 +4,8 @@
 	<property name="native" location="../../src/native"/>
 	<property name="libname32" value="liblwjgl.so"/>
 	<property name="libname64" value="liblwjgl64.so"/>
-    <property name="libs32" value="-L/usr/local/lib -lm -lX11 -lXext -lXcursor -lXrandr -pthread -L${java.home}/lib/i386 -ljawt" />
-    <property name="libs64" value="-L/usr/local/lib -lm -lX11 -lXext -lXcursor -lXrandr -lXxf86vm -pthread -L${java.home}/lib/amd64 -ljawt" />
+    <property name="libs32" value="-L/usr/X11R6/lib -lm -lX11 -lXext -lXcursor -lXrandr -pthread -L${java.home}/lib/i386 -ljawt" />
+    <property name="libs64" value="-L/usr/X11R6/lib -lm -lX11 -lXext -lXcursor -lXrandr -lXxf86vm -pthread -L${java.home}/lib/amd64 -ljawt" />
     <property name="cflags32" value="-O2 -Wall -c -fPIC -std=c99 -Wunused"/>
 
 	<target name="clean">
@@ -57,6 +57,14 @@
             </and>
         </condition>
 
+    	<!-- On OpenBSD, the 64 bit jre doesn't have the 32 bit libs -->
+    	<condition property="build.64bit.only">
+            <and>
+                <os name="OpenBSD"/>
+                <equals arg1="${hwplatform}" arg2="amd64"/>
+            </and>
+        </condition>
+
     	<antcall target="compile32"/>
     	<antcall target="compile64"/>
     </target>
@@ -67,9 +75,12 @@
 			<arg line="${cflags32} ${cflags_pthread}"/>
 			<arg value="-I${java.home}/include"/>
 			<arg value="-I${java.home}/include/freebsd"/>
+			<arg value="-I${java.home}/include/openbsd"/>
 			<arg value="-I${java.home}/../include"/>
 			<arg value="-I${java.home}/../include/freebsd"/>
+			<arg value="-I${java.home}/../include/openbsd"/>
 			<arg value="-I/usr/local/include"/>
+			<arg value="-I/usr/X11R6/include"/>
 			<arg value="-I${native}/common"/>
 		    <arg value="-I${native}/common/opengl"/>
 			<arg value="-I${native}/linux"/>
@@ -99,9 +110,12 @@
 			<arg line="${cflags64} ${cflags_pthread}"/>
 			<arg value="-I${java.home}/include"/>
 			<arg value="-I${java.home}/include/freebsd"/>
+			<arg value="-I${java.home}/include/openbsd"/>
 			<arg value="-I${java.home}/../include"/>
 			<arg value="-I${java.home}/../include/freebsd"/>
+			<arg value="-I${java.home}/../include/openbsd"/>
             <arg value="-I/usr/local/include"/>
+            <arg value="-I/usr/X11R6/include"/>
             <arg value="-I${native}/common"/>
 		    <arg value="-I${native}/common/opengl"/>
 			<arg value="-I${native}/linux"/>
